package com.ilearn.zookeeper;

import org.apache.zookeeper.ZooKeeper;

import java.io.IOException;

/**
 * @Project: seb-core
 * @Description:
 * @Version 1.0
 * @Throws SystemException:
 * @Author: <li>2018/12/13 lyndon Create 1.0
 * @Copyright (c)2018-2018 中央结算公司，版权所有
 * @Modified By:
 */
public class ConnectionDemo {
    public static void main(String[] args) {
        try {
            final ZooKeeper zooKeeper =
                    new ZooKeeper("192.168.100.151:2181,192.168.100.152:2181,192.168.100.153:2181", 4000, null);
            System.out.println(zooKeeper.getState());

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
